// Simple program to demonstrate the use of vectors
#include <iostream>
#include <vector>
#include <string>


int main()
{
  // Create a vector strings with 5 elements:
  std::vector<std::string> vec_str(5);

  // Create an empty vector of integers:
  std::vector<int> vec_int;

  // 
  std::cout << "vec_str.size() = " << vec_str.size() << std::endl
	    << "vec_int.size() = " << vec_int.size() << "\n\n";
  
  // Set the elements of vec_str:
  vec_str[0] = "Hel";
  vec_str[1] = "lo,";
  vec_str[2] = " Wo";
  vec_str[3] = "rld";
  vec_str[4] = "!\n";

  // Print the vector of strings:
  int i;
  for(i = 0; i < vec_str.size(); i++) {
    std::cout << vec_str[i];
  }
  std::cout << std::endl;

  // Add elements to the vector of integers:
  vec_int.push_back(2);
  vec_int.push_back(3);
  vec_int.push_back(5);
  vec_int.push_back(7);

  // Subtract remove from the back of the vector:
  vec_int.pop_back();

  std::cout << "First element = " << vec_int.front() << std::endl
	    << "Last element  = " << vec_int.back() << std::endl;

  return 0;
}
